package cz.boxdesign.library.entity.dao;

import java.util.List;

import cz.boxdesign.library.common.dao.DatabaseOperationException;
import cz.boxdesign.library.entity.LibraryEntity;

public interface EntityDao<T extends LibraryEntity> {

  List<T> getAll() throws DatabaseOperationException;

  T getById(Integer id) throws DatabaseOperationException;

  List<T> getByClause(String clause) throws DatabaseOperationException;

  void updateEntity(T entity) throws DatabaseOperationException;

  void insertEntity(T entity) throws DatabaseOperationException;

  void deleteEntity(T entity) throws DatabaseOperationException;

  void batchUpdate(List<T> entityList) throws DatabaseOperationException;

  void batchInsert(List<T> entityList) throws DatabaseOperationException;

  void batchDelete(List<T> entityList) throws DatabaseOperationException;
}
